#ifndef GGRAPH
#define GGRAPH

#include<stdio.h>
#include<stdlib.h>

#define MAX 7
#define INF 65536

typedef struct
{
	double edges[MAX][MAX];
	int v_num, e_num;
}MatGraph;

typedef struct 
{
	int rank;
	int parent;
}UFSTree;

typedef struct 
{
	int u, v;
	double weight;
}Edge;

void create (MatGraph **, double [][MAX], int, int);
void print (MatGraph *);
void destroy (MatGraph *);

void make_set (UFSTree *, int);
int find_set (UFSTree *, int);
void union_set (UFSTree *, int, int);

void prim (MatGraph *, int);

void kruskal (MatGraph *);

void dijkstra (MatGraph *, int);
void print_sp (int *, double *, int *, int);
void print_core (int, int *, int);

void insert_sort (Edge *, int);

#endif
